<include file="Public:header" />
<div id="mainWrap">
  <div id="main">
    <div class="blank15"></div>
    <div class="blank5"></div>
    <div id="position">当前位置:用户管理</div>
    <ul class="clearfix mb10" id="subNav">
      <li><a href="{:U('user/index')}">用户资料管理</a> -- <a href="{:U('user/add')}">添加用户</a></li>
      <li><a href="{:U('role/index')}">用户组管理</a> -- <a href="{:U('role/add')}">添加用户组</a></li>
      <li><a href="{:U('node/index')}">权限节点管理</a> -- <a href="{:U('node/add')}">添加权限节点</a></li>
    </ul>
    <div id="searchArea">
	  <script>
$(document).ready(function(){    
 $.validator.addMethod("stringCheck", function(value, element) {       
     return this.optional(element) || /^[_A-Za-z0-9]+$/.test(value);       
 }, "英文字母、数字和下划线");    
});
 		</script>
      <form method="post" action="<if condition="ACTION_NAME=='add'">{:U('User/insert')}<else />{:U('User/update')}</if>" id="myform">
        <table width="100%" cellspacing="10" cellpadding="0">
          <tbody>
            <tr>
              <td width="115" align="right"></td>
              <td align="left"></td>
            </tr>
            <tr>
              <td width="115" align="right"> 账号: </td>
              <td>
			 <if condition="ACTION_NAME=='add'"> <input type="text" style="width:185px;"  size="25" validate="{required:true,stringCheck:true,rangelength:[5,15],remote:'<php> echo U('public/checkname');</php>',messages:{remote:'用户名字已存在！'}}" class="intxt" id="username" name="username" value="{$vo.username}"><font color="#ff0000">*</font><else />{$vo.username}</if>
                </td>
            </tr>
            <tr>
              <td align="right"> 密码: </td>
              <td><input type="password" value="" validate="{<if condition="ACTION_NAME=='add'">required:true,</if>minlength:6}" size="25" class="intxt" id="password" name="password">
                <font color="#ff0000">*</font></td>
            </tr>
            <tr>
              <td align="right"> 确认密码: </td>
              <td><input type="password" size="25" validate="{<if condition="ACTION_NAME=='add'">required:true,</if>equalTo:'#password'}" class="intxt" id="repassword" name="repassword">
                <font color="#ff0000">*</font></td>
            </tr>
            <tr>
              <td align="right"> 真实姓名: </td>
              <td><input type="text" validate="{required:true}" style="width:185px;" class="intxt" id="nickname" name="nickname" value="{$vo['nickname']}">
                <font color="#ff0000">*</font></td>
            </tr>
			<tr>
              <td align="right"> 邮箱: </td>
              <td><input type="text" style="width:185px;" validate="{required:true,email:true<if condition="ACTION_NAME=='add'">,remote:'<php> echo U('public/checkemail');</php>',messages:{remote:'邮箱已存在！'}</if>}" class="intxt" id="email" name="email" value="{$vo.email}"> <font color="#ff0000">*</font></td>
            </tr>
			<tr><td align="right">是否激活:</td><td>是 <input type="radio" value="1" name="status" <empty name="$vo['status']">checked="checked"<else /> <if condition="$vo['status'] eq 1">checked="checked"</if></empty>> 否 <input type="radio" value="0" name="status" <notempty name="$vo['status']"><if condition="$vo['status'] eq 0">checked="checked"</if></notempty>></td></tr>
            <tr>
              <td align="right"> QQ: </td>
              <td><input type="text" style="width:185px;"  size="25" class="intxt" id="qq" name="qq" value="{$vo.qq}" ></td>
            </tr>
            
            <tr>
              <td></td>
              <td><input type="submit" class="btn_tijiao" value=""></td>
            </tr>
          </tbody>
        </table>
      </form>
    </div>
  </div>
  <div id="mainBot"></div>
</div>
<include file="Public:footer" />